home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The 640 MEG Shareware Studio 2
/
The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO
/
clang
/
tcplusx.zip
/
CURSOR.H
< prev
next >
Wrap
C/C++ Source or Header
|
1991-02-28
|
3KB
|
141 lines
#ifndef _CURSOR_H
#define _CURSOR_H
//
// cursor.h - header file for class Cursor
// Author - Robin W. McKean
// Last Update - February 23,1991
// Copyright (C) 1991 All rights reserved
//
// This file remains the property of the author, Robin W. McKean. You are
// free to use and change it as you see fit. This module, nor its object
// code, may not however be included in any packaged software without the
// written consent of the author.
//
// Contents ----------------------------------------------------------------
//
// Cursor
//
// Description
//
// Defines the class Cursor. The purpose of this class is to serve
// as a cursor device for moving around and positioning on the screen.
// It does not create or return any events, it just responds to events
// passed to it from the program.
//
// End ---------------------------------------------------------------------
// Interface Dependencies ---------------------------------------------------
#ifndef _IOSTREAM_H
#include <iostream.h>
#define _IOSTREAM_H
#endif
#ifndef _GEN_H
#include <gen.h>
#endif
#ifndef _USETYPES_H
#include <usetypes.h>
#endif
#ifndef _OBJECT_H
#include <object.h>
#endif
#ifndef _EVENT_H
#include <event.h>
#endif
#ifndef _DEVICE_H
#include <device.h>
#endif
// End Interface Dependencies ------------------------------------------------
// Class //
class Cursor : public Device
{
public:
Cursor( int initStatus = D_ON );
Cursor( Device& );
~Cursor( void );
classType isA( ) const;
char *nameOf( ) const;
int processA( Event& );
void pollDevice( );
private:
int initialCursorState;
int oldCursorState;
int currentCursorState;
int line;
int column;
};
// Description --------------------------------------------------------------
//
// The cursor class does not process any events. It merely responds
// to events as passed to it.
//
// Constructor
//
// Cursor( int initStatus = D_ON )
//
// Initializes the device, and determines its initial status. It also
// saves information needed to restore the cursor upon destruction
//
// Cursor( Cursor& )
//
// Copy constructor, copies one device into another.
//
// Destructor
//
// ~Cursor()
//
// Resets the cursor to the way it was when this object was created
//
// Member Functions
//
// isA( )
//
// Returns character class type cursorClass
//
// nameOf( )
//
// Returns a character representation of class, "Cursor"
//
// printOn( ostream& )
//
// Prints the contents of the class in a logical fashion
//
// processA( Event& )
//
// Responsible for taking an event, and processing the contents if
// applicable to this device
//
// pollDevice( )
//
// Requests information from a device, and translated into an event
// which is fed directly into the event manager's queue. Remeber, the
// cursor doesn't return any events.
//
// Inherited Members
//
// isSortable( ) inherited from Object
// isAssociation( ) inherited from Object
// operator new inherited from Object
// firstThat( ) inherited from Object
// lastThat( ) inherited from Object
// hashValue( ) inherited from Device
// isEqual( ) inherited from Device
//
// End Description ----------------------------------------------------------
#endif // _CURSOR_H //